<div class="main">

    <script src="code/js/common/wangEditor.js"></script>
    <script>
        $('.left').append('<div class="modal"></div>');
        $('.preview').click(function () {
            var summary = $('#editor-trigger').html();

            $('.modal_preview').css({
                height:$(window).height(),
                width:$(window).width()}
            ).show();
            $('.modal_content').empty().append(summary);
            var arrImg = $('.modal_content').find('img');
            $.each(arrImg, function (key, val) {
                if ($(val).width() > 250) {
                    $(val).css({
                        maxWidth: '100%',
                        height: 'auto'
                    })
                }

            })
        })
        $('.modal_close').click(function () {
            $('.modal_preview').hide();
        })
    </script>
    <div class="content_title">
        <span>美物管理>>{{msg}}</span>
        <button class="common_btn preview">预览</button>
        <button class="common_btn cancel" ng-click="cancel()">返回</button>
    </div>

    <div class="content_main">
        <table class="table goods_add_table">
            <tr>
                <td>
                    <i class="redStar">*</i>
                    标题:
                </td>
                <td>
                    <input type="text" ng-model="data.title" class="common_input">
                </td>
            </tr>

            <tr>
                <td>
                    <i class="redStar">*</i>
                    图片:
                </td>
                <td id="goods_col_icon">
                    <input type="file" id="upload_goods_Icon" accept="image/jpg,image/png" class="input_upload">
                </td>
            </tr>

            <tr>
                <td>
                    <i class="redStar">*</i>
                    作者:
                </td>
                <td>
                    <input type="text" class="title_input" ng-model="data.author">
                </td>
            </tr>

            <tr>
                <td>
                    <i class="redStar">*</i>
                    内容:
                </td>
                <td>
                    <div class="container">
                        <div id="editor-trigger">
                        </div>
                    </div>
                </td>
            </tr>

            <tr>
                <td>
                    <i class="redStar">*</i>
                    归属:
                </td>
                <td>
                    <select name="" id="goods_father" class="select" ng-model="goods.father">
                        <option value=""></option>
                        <option value="">番剧</option>
                        <option value="">游戏</option>
                        <option value="">手办</option>
                        <option value="">COS</option>
                        <option value="">舞蹈</option>
                        <option value="">音乐</option>
                        <option value="">御宅♂</option>
                        <option value="">彼女♀</option>
                        <option value="">美物</option>
                    </select>
                </td>
            </tr>

            <tr>
                <td>外显时间:</td>
                <td>
                    <input type="datetime-local" step=1 id="goods_releaseTime" class="dateLocal_input">
                </td>
            </tr>

            <tr>
                <td>排序值:</td>
                <td>
                    <input type="text" class="id_input" ng-model="data.weight">
                </td>
            </tr>

            <!--<tr>-->
            <!--<td>-->
            <!--<i class="redStar">*</i>-->
            <!--有效-->
            <!--</td>-->
            <!--<td>-->
            <!--<input type="radio" id="goods_add_type1" name="goods_add_type" >-->
            <!--<label for="goods_add_type1" class="common_label">有效</label>-->

            <!--<input type="radio" id="goods_add_type2" name="goods_add_type">-->
            <!--<label for="goods_add_type2" class="common_label">无效</label>-->
            <!--</td>-->
            <!--</tr>-->
        </table>

        <div class="preserveCancel">
            <button class="preserve_btn" ng-click="goodsPost(this)">保存</button>
            <button class="cancel_btn" ng-click="goodsCancel()">取消</button>
        </div>
    </div>

    <div class="modal_preview">
        <img class="modal_close" src="code/css/close.png" alt="">
        <div class="modal_content">

        </div>
    </div>
</div>